package com.atguigu.fruit;

import com.atguigu.fruit.condition.MyCondition;
import com.atguigu.fruit.pojo.Tiger;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.Conditional;

public class SpringConfiguration2 {
    @Conditional(MyCondition.class)
    @Bean
    public Tiger getTiger() {

        return new Tiger("东北虎", 16);
    }
}
